#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {

	int max = 0;
	int min = 100;
	int sum = 0;
	int i = 0;
	int n = 0;
	for (i = 0; i < 7; i++) {
		scanf("%d", &n);
		if (max < n){
			max = n;
		}
		if (min > n) {
			min = n;
		}
		sum += n;
	}
	sum = sum - min - max;
	double p = sum / 5.0;
	printf("%.2lf", p);
	return 0;
}